<?php /* Smarty version Smarty-3.1.18, created on 2017-06-01 14:02:40
         compiled from "/data/www/mystery/protected/views/benchmark/history.tpl" */ ?>
<?php /*%%SmartyHeaderCode:581479703551b6df2828ea1-72529112%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5b4691b679941ac757c3f79b5186fc4f1d268f81' => 
    array (
      0 => '/data/www/mystery/protected/views/benchmark/history.tpl',
      1 => 1494904490,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '581479703551b6df2828ea1-72529112',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_551b6df2901aa1_76775979',
  'variables' => 
  array (
    'netquestion' => 0,
    'list' => 0,
    'val' => 0,
    'networklevel' => 0,
    'level' => 0,
    'network_id' => 0,
    'managelist' => 0,
    'v' => 0,
    'question' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_551b6df2901aa1_76775979')) {function content_551b6df2901aa1_76775979($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/iframe_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<table class="gridtable table  table-bordered">
        <tr>
        <th width="15%">操作用户</th>
        <th width="7%">等级/是否还分</th>
        <th width="10%">对标情况</th>
        <th width="35%">申诉意见</th>
        <th width="16%">操作时间</th>
        <th width="6%">附件</th>
        <?php if ($_smarty_tpl->tpl_vars['netquestion']->value['status']==1) {?><th width="6%">操作</th><?php }?>
    </tr>
    <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
    <tr id="qb_<?php echo $_smarty_tpl->tpl_vars['val']->value['qb_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['val']->value['is_self']==1) {?>style="background:#8fbc8f"<?php }?>>
        <td><?php echo $_smarty_tpl->tpl_vars['val']->value['network_name'];?>
</td>
        <td><?php if ($_smarty_tpl->tpl_vars['networklevel']->value[$_smarty_tpl->tpl_vars['val']->value['level']]) {?><?php echo $_smarty_tpl->tpl_vars['networklevel']->value[$_smarty_tpl->tpl_vars['val']->value['level']]['desc'];?>
<?php } else { ?><?php }?></td>
        <?php if ($_smarty_tpl->tpl_vars['val']->value['is_self']==1) {?>
        <td><?php if ($_smarty_tpl->tpl_vars['val']->value['isreturn']==1) {?>申请还分<?php } elseif ($_smarty_tpl->tpl_vars['val']->value['isreturn']==0) {?>不申请<?php } else { ?>未知<?php }?></td>
        <td style="word-wrap:break-word;word-break:break-all;line-height: 20px" title="<?php echo $_smarty_tpl->tpl_vars['val']->value['suggestion'];?>
"><?php echo $_smarty_tpl->tpl_vars['val']->value['suggestion'];?>
</td>
        <?php } else { ?>
            <td colspan="2" style="word-wrap:break-word;word-break:break-all;line-height: 20px" title="<?php echo $_smarty_tpl->tpl_vars['val']->value['suggestion'];?>
"><?php echo $_smarty_tpl->tpl_vars['val']->value['suggestion'];?>
</td>
        <?php }?>
        <td><?php echo $_smarty_tpl->tpl_vars['val']->value['create_time'];?>
</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['val']->value['haveattach']) {?>
            <a href="javascript:;" onclick="attachlist(<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['network_id'];?>
)">附件</a>
            <?php }?>
        </td>
        <?php if ($_smarty_tpl->tpl_vars['netquestion']->value['status']==1) {?>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['netquestion']->value['node_id']==0||$_smarty_tpl->tpl_vars['netquestion']->value['node_id']>=$_smarty_tpl->tpl_vars['level']->value) {?>
            <?php if ($_smarty_tpl->tpl_vars['val']->value['network_id']==$_smarty_tpl->tpl_vars['network_id']->value) {?>
                <?php if ($_smarty_tpl->tpl_vars['level']->value!=4) {?>
                <a href="javascript:;" onclick="suggest(<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
);">编辑</a> 
                <?php } else { ?>
                <a href="javascript:;" onclick="shenqing(<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['qb_id'];?>
);">编辑</a> 
                <?php }?>
            <a href="javascript:;" onclick="del(<?php echo $_smarty_tpl->tpl_vars['val']->value['qb_id'];?>
)">删除</a>
            <?php }?>
            <?php }?>
        </td>
        <?php }?>
    </tr>
    <?php } ?>
        <!-- 后台审核列表-->
    <?php if ($_smarty_tpl->tpl_vars['managelist']->value) {?>
    <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['managelist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
    <tr style="background: #529EC6;">
        <td><?php echo $_smarty_tpl->tpl_vars['v']->value['truename'];?>
</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['v']->value['isreturn_type']=='改') {?>是<?php }?>
            <?php if ($_smarty_tpl->tpl_vars['v']->value['isreturn_type']=='扣') {?>改扣<?php }?>
            <?php if ($_smarty_tpl->tpl_vars['v']->value['isreturn_type']=='是') {?>是<?php }?>
            <?php if ($_smarty_tpl->tpl_vars['v']->value['isreturn_type']=='否') {?>否<?php }?>
        </td>
        <td>
            <?php if (in_array($_smarty_tpl->tpl_vars['v']->value['isreturn_type'],array('是','否'))) {?>
                <?php if ($_smarty_tpl->tpl_vars['question']->value['show_score']) {?>
                    <?php if ($_smarty_tpl->tpl_vars['v']->value['isreturn_type']=='是') {?>
                        还分至<?php echo $_smarty_tpl->tpl_vars['v']->value['isreturn'];?>

                    <?php }?>
                <?php } else { ?>
                        还分
                <?php }?>
            <?php }?>

            <?php if (in_array($_smarty_tpl->tpl_vars['v']->value['isreturn_type'],array('改','扣'))) {?>
                <?php if ($_smarty_tpl->tpl_vars['question']->value['show_score']) {?>
                    改扣至<?php echo $_smarty_tpl->tpl_vars['v']->value['isreturn'];?>

                <?php } else { ?>
                    改扣
                <?php }?>
            <?php }?>
        </td>
        <td><?php echo $_smarty_tpl->tpl_vars['v']->value['suggestion'];?>
</td>
        <td colspan="3"><?php echo $_smarty_tpl->tpl_vars['v']->value['create_time'];?>
</td>
        </tr>
        <?php } ?>
    <?php }?>
</table>
<script>
 //申请还分附件列表
function attachlist(nq_id,subject_id,network_id){
    $.layer({
        type: 2,
        title: '申请还分附件列表',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['10px',''],
        area: ['450px', '350px'],
        iframe: {src: '/benchmark/DuibiaoAttach?nq_id='+nq_id+'&subject_id='+subject_id+'&network_id='+network_id}
    }); 
        
}
//删除
function del(qb_id){
    if (confirm('确定删除？')) {
        $.getJSON('/benchmark/DelAudit',{qb_id:qb_id},function(res){
        if (res.status==1) {
            $('#qb_'+qb_id).remove();
        }
        alert(res.note);
        });
        
    }
}
//还分申请
function shenqing(nq_id,subject_id,qb_id){
    $.layer({
        type: 2,
        title: '对标内容',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['10px',''],
        area: ['550px', '450px'],
        iframe: {src: '/benchmark/duibiao?nq_id='+nq_id+'&subject_id='+subject_id+'&iframe=1'}
    });   
}
//上级网点给出意见
function suggest(nq_id,subject_id){
    $.layer({
        type: 2,
        title: '审核意见',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['50px',''],
        area: ['500px', '400px'],
        iframe: {src: '/benchmark/suggest?nq_id='+nq_id+'&subject_id='+subject_id+'&iframe=1'}
    });   
}
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
